//
//  UIView+SingerTap.m
//  NetworkTaxiDriver
//
//  Created by thinkjoy on 16/8/30.
//  Copyright © 2016年 Thinkjoy_RS. All rights reserved.
//

#import "UIView+SingerTap.h"


 UIViewSingerTapBlock _singerTapBlock;
@implementation UIView (SingerTap)

- (void)addSingerTapCompletion:(UIViewSingerTapBlock)singerTap
{
    _singerTapBlock =   [singerTap copy];
    
    UITapGestureRecognizer * singleTap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickSingTap:)];
    self.userInteractionEnabled =   YES;
    [self    addGestureRecognizer:singleTap];
}


- (void)clickSingTap:(UITapGestureRecognizer *)gesture
{
    _singerTapBlock(gesture);
}

@end
